<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主页</title>
</head>
<body>
<h3>
    hello,<span></span>
</h3>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>
let span=document.querySelector("span");
$.ajax({
    type:'get',
    url:'/info',
    success:function (body) {
        if(body.status==0){
            span.innerHTML+=body.data;
        }else{
            alert("登陆失败:"+body.message);
            location.assign("login.html");
        }
    }
});
</script>
</body>
</html>